/*HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
 H       definitions.h
 H       Application name: tcss422-project2
 H       Programmers names:	Evan Phillips, Lucas Cowell, Tony Butterfield
 H       Date created:	May 13, 2011
 H       Date completed: 
 H       Brief Description: header file that collects the #defines apply to the whole project
 H
 HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH*/

#ifndef DEFINITIONS_H_
#define DEFINITIONS_H_
#endif /* DEFINITIONS_H_ */



#ifndef PROCESS_STATE
#define PROCESS_STATE   int
#define P_RUNNING       0
#define P_READY         1
#define P_INTERRUPTED   2
#define P_BLOCKED       3
#endif /* PROCESS_STATE*/

#ifndef BOOLEAN
#define BOOLEAN     unsigned char
#define TRUE        1
#define FALSE       0
#endif /* BOOLEAN */

#ifndef ERROR_MESSAGES
#define ERROR_MESSAGES          int
#define NULL_POINTER_ERROR      0x1
#define INVALID_ARGUMENT_ERROR  0x2

//TODO:  add any error messages needed here.  Values increment by factor of 2.
#endif /* ERROR_MESSAGE */

#ifndef INTERRUPT_REQUESTS
#define INTERRUPT_REQUESTS      int
#define SYS_TIMER_INTERRUPT     (int) 0x1
#define IO_KBD_REQUEST          (int) 0x2         // request for keyboard I/O
#define IO_DSK_REQUEST          (int) 0x4         // request for disc I/O
#define IO_VID_REQUEST          (int) 0x8         // request for video I/O
#define IO_DEV_KBD_INTERRUPT    (int) 0x10        // keyboard interrupt
#define IO_DEV_DSK_INTERRUPT    (int) 0x20        // disc interrupt
#define IO_DEV_VID_INTERRUPT    (int) 0x40        // video interrupt
#define SYS_EXCEPTION_DIV_BY_0  (int) 0x80
#define SYS_SEM_UP_REQUEST      (int) 0x100       // what do we need here?
#define SYS_SEM_DWN_REQUEST     (int) 0x200
//TODO: define the rest of the requests... semaphore up/down, etc.

#define TIMER_MASK
#endif /* INTERRUPT_REQUESTS */



#ifndef IO_SETTINGS
#define IO_SETTINGS
#define MAX_IO_TIME_DELAY           50.0    // sets the max delay (in steps) between request
                                            // and interrupt.
#endif  /* IO_SETTINGS */

#ifndef TIMER_SETTINGS
#define TIMER_SETTINGS
#define TIMER_INTERRUPT_INTERVAL    50     // since we're simulating using 'steps' rather than
                                            // using the actual timing of independent threads,
                                            // this number doesn't have to be ginormous...
#endif
